/**
 * problem_001.c
 * Copyright (C) 2011-03-17 - xrose
 * Find the sum of all the multiples of 3 or 5 below 1000.
 * result: 233168
 */

#include <stdio.h>
int main(){
    int sum = 0;
    int i;
    for(i=0; i<1000; i++){
        if((i%3 == 0)||(i%5 == 0)){
            sum +=i;
        }
    }
    printf("The sum of all the multiples of 3 or 5 below 1000 is %d\n", sum);
    return 0;
}
